package com.asc.test {
import com.asc.Comparable;
import com.asc.Identifiable;

public class DefaultComparable implements Comparable {
  private var value:int;
  public function DefaultComparable(value:int) {
    this.value = value;
  }

  public function compareTo(other:Comparable):int {
    return value - (other as DefaultComparable).value
  }

  public function equals(other:Identifiable):Boolean {
    if(other is Comparable) {
      const o:Comparable = other as Comparable;
      return o.compareTo(this) === 0;
    }
    return false
  }

  public function hashCode():int {
    return value;
  }

  public function get toString():String {
    return null;
  }
}
}